package com.dc.handler;


import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;

//SpringMVC对异常的处理，不仅可以使用@ExceptionHandler，而且可以使用@ResponseStatus注解。
@ResponseStatus(HttpStatus.NOT_FOUND)//指定NotFoundException作为NOT_FOUND状态返回到404页面
public class NotFoundException extends RuntimeException {

    public NotFoundException() {
    }

    public NotFoundException(String message) {
        super(message);
    }

    public NotFoundException(String message, Throwable cause) {
        super(message, cause);
    }
}

